<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="spanner_v1.html">Cloud Spanner API</a> . <a href="spanner_v1.projects.html">projects</a> . <a href="spanner_v1.projects.instances.html">instances</a> . <a href="spanner_v1.projects.instances.databases.html">databases</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="spanner_v1.projects.instances.databases.backupSchedules.html">backupSchedules()</a></code>
</p>
<p class="firstline">Returns the backupSchedules Resource.</p>

<p class="toc_element">
  <code><a href="spanner_v1.projects.instances.databases.databaseRoles.html">databaseRoles()</a></code>
</p>
<p class="firstline">Returns the databaseRoles Resource.</p>

<p class="toc_element">
  <code><a href="spanner_v1.projects.instances.databases.operations.html">operations()</a></code>
</p>
<p class="firstline">Returns the operations Resource.</p>

<p class="toc_element">
  <code><a href="spanner_v1.projects.instances.databases.sessions.html">sessions()</a></code>
</p>
<p class="firstline">Returns the sessions Resource.</p>

<p class="toc_element">
  <code><a href="#addSplitPoints">addSplitPoints(database, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Adds split points to specified tables and indexes of a database.</p>
<p class="toc_element">
  <code><a href="#changequorum">changequorum(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">`ChangeQuorum` is strictly restricted to databases that use dual-region instance configurations. Initiates a background operation to change the quorum of a database from dual-region mode to single-region mode or vice versa. The returned long-running operation has a name of the format `projects//instances//databases//operations/` and can be used to track execution of the `ChangeQuorum`. The metadata field type is ChangeQuorumMetadata. Authorization requires `spanner.databases.changequorum` permission on the resource database.</p>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates a new Spanner database and starts to prepare it for serving. The returned long-running operation will have a name of the format `/operations/` and can be used to track preparation of the database. The metadata field type is CreateDatabaseMetadata. The response field type is Database, if successful.</p>
<p class="toc_element">
  <code><a href="#dropDatabase">dropDatabase(database, x__xgafv=None)</a></code></p>
<p class="firstline">Drops (aka deletes) a Cloud Spanner database. Completed backups for the database will be retained according to their `expire_time`. Note: Cloud Spanner might continue to accept requests for a few seconds after the database has been deleted.</p>
<p class="toc_element">
  <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Gets the state of a Cloud Spanner database.</p>
<p class="toc_element">
  <code><a href="#getDdl">getDdl(database, x__xgafv=None)</a></code></p>
<p class="firstline">Returns the schema of a Cloud Spanner database as a list of formatted DDL statements. This method does not show pending schema updates, those may be queried using the Operations API.</p>
<p class="toc_element">
  <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource. For backup schedules, authorization requires `spanner.backupSchedules.getIamPolicy` permission on resource.</p>
<p class="toc_element">
  <code><a href="#getScans">getScans(name, endTime=None, startTime=None, view=None, x__xgafv=None)</a></code></p>
<p class="firstline">Request a specific scan with Database-specific data for Cloud Key Visualizer.</p>
<p class="toc_element">
  <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Lists Cloud Spanner databases.</p>
<p class="toc_element">
  <code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
  <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates a Cloud Spanner database. The returned long-running operation can be used to track the progress of updating the database. If the named database does not exist, returns `NOT_FOUND`. While the operation is pending: * The database's reconciling field is set to true. * Cancelling the operation is best-effort. If the cancellation succeeds, the operation metadata's cancel_time is set, the updates are reverted, and the operation terminates with a `CANCELLED` status. * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error until the pending operation is done (returns successfully or with error). * Reading the database via the API continues to give the pre-request values. Upon completion of the returned operation: * The new values are in effect and readable via the API. * The database's reconciling field becomes false. The returned long-running operation will have a name of the format `projects//instances//databases//operations/` and can be used to track the database modification. The metadata field type is UpdateDatabaseMetadata. The response field type is Database, if successful.</p>
<p class="toc_element">
  <code><a href="#restore">restore(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Create a new database by restoring from a completed backup. The new database must be in the same project and in an instance with the same instance configuration as the instance containing the backup. The returned database long-running operation has a name of the format `projects//instances//databases//operations/`, and can be used to track the progress of the operation, and to cancel it. The metadata field type is RestoreDatabaseMetadata. The response type is Database, if successful. Cancelling the returned operation will stop the restore and delete the database. There can be only one database being restored into an instance at a time. Once the restore operation completes, a new restore operation can be initiated, without waiting for the optimize operation associated with the first restore to complete.</p>
<p class="toc_element">
  <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource. For backup schedules, authorization requires `spanner.backupSchedules.setIamPolicy` permission on resource.</p>
<p class="toc_element">
  <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance. Calling this method on a backup schedule that does not exist will result in a NOT_FOUND error if the user has `spanner.backupSchedules.list` permission on the containing database.</p>
<p class="toc_element">
  <code><a href="#updateDdl">updateDdl(database, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates the schema of a Cloud Spanner database by creating/altering/dropping tables, columns, indexes, etc. The returned long-running operation will have a name of the format `/operations/` and can be used to track execution of the schema changes. The metadata field type is UpdateDatabaseDdlMetadata. The operation has no response.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="addSplitPoints">addSplitPoints(database, body=None, x__xgafv=None)</code>
  <pre>Adds split points to specified tables and indexes of a database.

Args:
  database: string, Required. The database on whose tables or indexes the split points are to be added. Values are of the form `projects//instances//databases/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request for AddSplitPoints.
  &quot;initiator&quot;: &quot;A String&quot;, # Optional. A user-supplied tag associated with the split points. For example, &quot;initial_data_load&quot;, &quot;special_event_1&quot;. Defaults to &quot;CloudAddSplitPointsAPI&quot; if not specified. The length of the tag must not exceed 50 characters, or else it is trimmed. Only valid UTF8 characters are allowed.
  &quot;splitPoints&quot;: [ # Required. The split points to add.
    { # The split points of a table or an index.
      &quot;expireTime&quot;: &quot;A String&quot;, # Optional. The expiration timestamp of the split points. A timestamp in the past means immediate expiration. The maximum value can be 30 days in the future. Defaults to 10 days in the future if not specified.
      &quot;index&quot;: &quot;A String&quot;, # The index to split. If specified, the `table` field must refer to the index&#x27;s base table.
      &quot;keys&quot;: [ # Required. The list of split keys. In essence, the split boundaries.
        { # A split key.
          &quot;keyParts&quot;: [ # Required. The column values making up the split key.
            &quot;&quot;,
          ],
        },
      ],
      &quot;table&quot;: &quot;A String&quot;, # The table to split.
    },
  ],
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response for AddSplitPoints.
}</pre>
</div>

<div class="method">
    <code class="details" id="changequorum">changequorum(name, body=None, x__xgafv=None)</code>
  <pre>`ChangeQuorum` is strictly restricted to databases that use dual-region instance configurations. Initiates a background operation to change the quorum of a database from dual-region mode to single-region mode or vice versa. The returned long-running operation has a name of the format `projects//instances//databases//operations/` and can be used to track execution of the `ChangeQuorum`. The metadata field type is ChangeQuorumMetadata. Authorization requires `spanner.databases.changequorum` permission on the resource database.

Args:
  name: string, Required. Name of the database in which to apply `ChangeQuorum`. Values are of the form `projects//instances//databases/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request for ChangeQuorum.
  &quot;etag&quot;: &quot;A String&quot;, # Optional. The etag is the hash of the `QuorumInfo`. The `ChangeQuorum` operation is only performed if the etag matches that of the `QuorumInfo` in the current database resource. Otherwise the API returns an `ABORTED` error. The etag is used for optimistic concurrency control as a way to help prevent simultaneous change quorum requests that could create a race condition.
  &quot;name&quot;: &quot;A String&quot;, # Required. Name of the database in which to apply `ChangeQuorum`. Values are of the form `projects//instances//databases/`.
  &quot;quorumType&quot;: { # Information about the database quorum type. This only applies to dual-region instance configs. # Required. The type of this quorum.
    &quot;dualRegion&quot;: { # Message type for a dual-region quorum. Currently this type has no options. # Dual-region quorum type.
    },
    &quot;singleRegion&quot;: { # Message type for a single-region quorum. # Single-region quorum type.
      &quot;servingLocation&quot;: &quot;A String&quot;, # Required. The location of the serving region, for example, &quot;us-central1&quot;. The location must be one of the regions within the dual-region instance configuration of your database. The list of valid locations is available using the GetInstanceConfig API. This should only be used if you plan to change quorum to the single-region quorum type.
    },
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
      },
    ],
    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
  &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
  <pre>Creates a new Spanner database and starts to prepare it for serving. The returned long-running operation will have a name of the format `/operations/` and can be used to track preparation of the database. The metadata field type is CreateDatabaseMetadata. The response field type is Database, if successful.

Args:
  parent: string, Required. The name of the instance that will serve the new database. Values are of the form `projects//instances/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request for CreateDatabase.
  &quot;createStatement&quot;: &quot;A String&quot;, # Required. A `CREATE DATABASE` statement, which specifies the ID of the new database. The database ID must conform to the regular expression `a-z*[a-z0-9]` and be between 2 and 30 characters in length. If the database ID is a reserved word or if it contains a hyphen, the database ID must be enclosed in backticks (`` ` ``).
  &quot;databaseDialect&quot;: &quot;A String&quot;, # Optional. The dialect of the Cloud Spanner Database.
  &quot;encryptionConfig&quot;: { # Encryption configuration for a Cloud Spanner database. # Optional. The encryption configuration for the database. If this field is not specified, Cloud Spanner will encrypt/decrypt all data at rest using Google default encryption.
    &quot;kmsKeyName&quot;: &quot;A String&quot;, # The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`.
    &quot;kmsKeyNames&quot;: [ # Specifies the KMS configuration for one or more keys used to encrypt the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by `kms_key_names` must fully cover all regions of the database&#x27;s instance configuration. Some examples: * For regional (single-region) instance configurations, specify a regional location KMS key. * For multi-region instance configurations of type `GOOGLE_MANAGED`, either specify a multi-region location KMS key or multiple regional location KMS keys that cover all regions in the instance configuration. * For an instance configuration of type `USER_MANAGED`, specify only regional location KMS keys to cover each region in the instance configuration. Multi-region location KMS keys aren&#x27;t supported for `USER_MANAGED` type instance configurations.
      &quot;A String&quot;,
    ],
  },
  &quot;extraStatements&quot;: [ # Optional. A list of DDL statements to run inside the newly created database. Statements can create tables, indexes, etc. These statements execute atomically with the creation of the database: if there is an error in any statement, the database is not created.
    &quot;A String&quot;,
  ],
  &quot;protoDescriptors&quot;: &quot;A String&quot;, # Optional. Proto descriptors used by `CREATE/ALTER PROTO BUNDLE` statements in &#x27;extra_statements&#x27;. Contains a protobuf-serialized [`google.protobuf.FileDescriptorSet`](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto) descriptor set. To generate it, [install](https://grpc.io/docs/protoc-installation/) and run `protoc` with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run ``` $protoc --proto_path=/app_path --proto_path=/lib_path \ --include_imports \ --descriptor_set_out=descriptors.data \ moon/shot/app.proto ``` For more details, see protobuffer [self description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
      },
    ],
    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
  &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="dropDatabase">dropDatabase(database, x__xgafv=None)</code>
  <pre>Drops (aka deletes) a Cloud Spanner database. Completed backups for the database will be retained according to their `expire_time`. Note: Cloud Spanner might continue to accept requests for a few seconds after the database has been deleted.

Args:
  database: string, Required. The database to be dropped. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}</pre>
</div>

<div class="method">
    <code class="details" id="get">get(name, x__xgafv=None)</code>
  <pre>Gets the state of a Cloud Spanner database.

Args:
  name: string, Required. The name of the requested database. Values are of the form `projects//instances//databases/`. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A Cloud Spanner database.
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. If exists, the time at which the database creation started.
  &quot;databaseDialect&quot;: &quot;A String&quot;, # Output only. The dialect of the Cloud Spanner Database.
  &quot;defaultLeader&quot;: &quot;A String&quot;, # Output only. The read-write region which contains the database&#x27;s leader replicas. This is the same as the value of default_leader database option set using DatabaseAdmin.CreateDatabase or DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
  &quot;earliestVersionTime&quot;: &quot;A String&quot;, # Output only. Earliest timestamp at which older versions of the data can be read. This value is continuously updated by Cloud Spanner and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.
  &quot;enableDropProtection&quot;: True or False, # Optional. Whether drop protection is enabled for this database. Defaults to false, if not set. For more details, please see how to [prevent accidental database deletion](https://cloud.google.com/spanner/docs/prevent-database-deletion).
  &quot;encryptionConfig&quot;: { # Encryption configuration for a Cloud Spanner database. # Output only. For databases that are using customer managed encryption, this field contains the encryption configuration for the database. For databases that are using Google default or other types of encryption, this field is empty.
    &quot;kmsKeyName&quot;: &quot;A String&quot;, # The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`.
    &quot;kmsKeyNames&quot;: [ # Specifies the KMS configuration for one or more keys used to encrypt the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by `kms_key_names` must fully cover all regions of the database&#x27;s instance configuration. Some examples: * For regional (single-region) instance configurations, specify a regional location KMS key. * For multi-region instance configurations of type `GOOGLE_MANAGED`, either specify a multi-region location KMS key or multiple regional location KMS keys that cover all regions in the instance configuration. * For an instance configuration of type `USER_MANAGED`, specify only regional location KMS keys to cover each region in the instance configuration. Multi-region location KMS keys aren&#x27;t supported for `USER_MANAGED` type instance configurations.
      &quot;A String&quot;,
    ],
  },
  &quot;encryptionInfo&quot;: [ # Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as all Cloud KMS key versions that are in use. The `encryption_status` field inside of each `EncryptionInfo` is not populated. For databases that are using Google default or other types of encryption, this field is empty. This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field.
    { # Encryption information for a Cloud Spanner database or backup.
      &quot;encryptionStatus&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. If present, the status of a recent encrypt/decrypt call on underlying data for this database or backup. Regardless of status, data is always encrypted at rest.
        &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
        &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
          {
            &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
          },
        ],
        &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
      },
      &quot;encryptionType&quot;: &quot;A String&quot;, # Output only. The type of encryption.
      &quot;kmsKeyVersion&quot;: &quot;A String&quot;, # Output only. A Cloud KMS key version that is being used to protect the database or backup.
    },
  ],
  &quot;name&quot;: &quot;A String&quot;, # Required. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database.
  &quot;quorumInfo&quot;: { # Information about the dual-region quorum. # Output only. Applicable only for databases that use dual-region instance configurations. Contains information about the quorum.
    &quot;etag&quot;: &quot;A String&quot;, # Output only. The etag is used for optimistic concurrency control as a way to help prevent simultaneous `ChangeQuorum` requests that might create a race condition.
    &quot;initiator&quot;: &quot;A String&quot;, # Output only. Whether this `ChangeQuorum` is Google or User initiated.
    &quot;quorumType&quot;: { # Information about the database quorum type. This only applies to dual-region instance configs. # Output only. The type of this quorum. See QuorumType for more information about quorum type specifications.
      &quot;dualRegion&quot;: { # Message type for a dual-region quorum. Currently this type has no options. # Dual-region quorum type.
      },
      &quot;singleRegion&quot;: { # Message type for a single-region quorum. # Single-region quorum type.
        &quot;servingLocation&quot;: &quot;A String&quot;, # Required. The location of the serving region, for example, &quot;us-central1&quot;. The location must be one of the regions within the dual-region instance configuration of your database. The list of valid locations is available using the GetInstanceConfig API. This should only be used if you plan to change quorum to the single-region quorum type.
      },
    },
    &quot;startTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the request was triggered.
  },
  &quot;reconciling&quot;: True or False, # Output only. If true, the database is being updated. If false, there are no ongoing update operations for the database.
  &quot;restoreInfo&quot;: { # Information about the database restore. # Output only. Applicable only for restored databases. Contains information about the restore source.
    &quot;backupInfo&quot;: { # Information about a backup. # Information about the backup used to restore the database. The backup may no longer exist.
      &quot;backup&quot;: &quot;A String&quot;, # Name of the backup.
      &quot;createTime&quot;: &quot;A String&quot;, # The time the CreateBackup request was received.
      &quot;sourceDatabase&quot;: &quot;A String&quot;, # Name of the database the backup was created from.
      &quot;versionTime&quot;: &quot;A String&quot;, # The backup contains an externally consistent copy of `source_database` at the timestamp specified by `version_time`. If the CreateBackup request did not specify `version_time`, the `version_time` of the backup is equivalent to the `create_time`.
    },
    &quot;sourceType&quot;: &quot;A String&quot;, # The type of the restore source.
  },
  &quot;state&quot;: &quot;A String&quot;, # Output only. The current database state.
  &quot;versionRetentionPeriod&quot;: &quot;A String&quot;, # Output only. The period in which Cloud Spanner retains all versions of data for the database. This is the same as the value of version_retention_period database option set using UpdateDatabaseDdl. Defaults to 1 hour, if not set.
}</pre>
</div>

<div class="method">
    <code class="details" id="getDdl">getDdl(database, x__xgafv=None)</code>
  <pre>Returns the schema of a Cloud Spanner database as a list of formatted DDL statements. This method does not show pending schema updates, those may be queried using the Operations API.

Args:
  database: string, Required. The database whose schema we wish to get. Values are of the form `projects//instances//databases/` (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response for GetDatabaseDdl.
  &quot;protoDescriptors&quot;: &quot;A String&quot;, # Proto descriptors stored in the database. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). For more details, see protobuffer [self description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
  &quot;statements&quot;: [ # A list of formatted DDL statements defining the schema of the database specified in the request.
    &quot;A String&quot;,
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
  <pre>Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource. For backup schedules, authorization requires `spanner.backupSchedules.getIamPolicy` permission on resource.

Args:
  resource: string, REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for `GetIamPolicy` method.
  &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`.
    &quot;requestedPolicyVersion&quot;: 42, # Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
  &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
    { # Associates `members`, or principals, with a `role`.
      &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
        &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
        &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
        &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
        &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
      },
      &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
        &quot;A String&quot;,
      ],
      &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
    },
  ],
  &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
  &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
}</pre>
</div>

<div class="method">
    <code class="details" id="getScans">getScans(name, endTime=None, startTime=None, view=None, x__xgafv=None)</code>
  <pre>Request a specific scan with Database-specific data for Cloud Key Visualizer.

Args:
  name: string, Required. The unique name of the scan containing the requested information, specific to the Database service implementing this interface. (required)
  endTime: string, The upper bound for the time range to retrieve Scan data for.
  startTime: string, These fields restrict the Database-specific information returned in the `Scan.data` field. If a `View` is provided that does not include the `Scan.data` field, these are ignored. This range of time must be entirely contained within the defined time range of the targeted scan. The lower bound for the time range to retrieve Scan data for.
  view: string, Specifies which parts of the Scan should be returned in the response. Note, if left unspecified, the FULL view is assumed.
    Allowed values
      VIEW_UNSPECIFIED - Not specified, equivalent to SUMMARY.
      SUMMARY - Server responses only include `name`, `details`, `start_time` and `end_time`. The default value. Note, the ListScans method may only use this view type, others view types are not supported.
      FULL - Full representation of the scan is returned in the server response, including `data`.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Scan is a structure which describes Cloud Key Visualizer scan information.
  &quot;details&quot;: { # Additional information provided by the implementer.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
  &quot;endTime&quot;: &quot;A String&quot;, # The upper bound for when the scan is defined.
  &quot;name&quot;: &quot;A String&quot;, # The unique name of the scan, specific to the Database service implementing this interface.
  &quot;scanData&quot;: { # ScanData contains Cloud Key Visualizer scan data used by the caller to construct a visualization. # Output only. Cloud Key Visualizer scan data. Note, this field is not available to the ListScans method.
    &quot;data&quot;: { # Cloud Key Visualizer scan data. The range of time this information covers is captured via the above time range fields. Note, this field is not available to the ListScans method.
      &quot;dataSourceEndToken&quot;: &quot;A String&quot;, # The token signifying the end of a data_source.
      &quot;dataSourceSeparatorToken&quot;: &quot;A String&quot;, # The token delimiting a datasource name from the rest of a key in a data_source.
      &quot;diagnosticMessages&quot;: [ # The list of messages (info, alerts, ...)
        { # A message representing the key visualizer diagnostic messages.
          &quot;info&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # Information about this diagnostic information.
            &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
              &quot;a_key&quot;: &quot;A String&quot;,
            },
            &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
            &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
          },
          &quot;metric&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The metric.
            &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
              &quot;a_key&quot;: &quot;A String&quot;,
            },
            &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
            &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
          },
          &quot;metricSpecific&quot;: True or False, # Whether this message is specific only for the current metric. By default Diagnostics are shown for all metrics, regardless which metric is the currently selected metric in the UI. However occasionally a metric will generate so many messages that the resulting visual clutter becomes overwhelming. In this case setting this to true, will show the diagnostic messages for that metric only if it is the currently selected metric.
          &quot;severity&quot;: &quot;A String&quot;, # The severity of the diagnostic message.
          &quot;shortMessage&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The short message.
            &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
              &quot;a_key&quot;: &quot;A String&quot;,
            },
            &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
            &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
          },
        },
      ],
      &quot;endKeyStrings&quot;: [ # We discretize the entire keyspace into buckets. Assuming each bucket has an inclusive keyrange and covers keys from k(i) ... k(n). In this case k(n) would be an end key for a given range. end_key_string is the collection of all such end keys
        &quot;A String&quot;,
      ],
      &quot;hasPii&quot;: True or False, # Whether this scan contains PII.
      &quot;indexedKeys&quot;: [ # Keys of key ranges that contribute significantly to a given metric Can be thought of as heavy hitters.
        &quot;A String&quot;,
      ],
      &quot;keySeparator&quot;: &quot;A String&quot;, # The token delimiting the key prefixes.
      &quot;keyUnit&quot;: &quot;A String&quot;, # The unit for the key: e.g. &#x27;key&#x27; or &#x27;chunk&#x27;.
      &quot;metrics&quot;: [ # The list of data objects for each metric.
        { # A message representing the actual monitoring data, values for each key bucket over time, of a metric.
          &quot;aggregation&quot;: &quot;A String&quot;, # The aggregation function used to aggregate each key bucket
          &quot;category&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The category of the metric, e.g. &quot;Activity&quot;, &quot;Alerts&quot;, &quot;Reads&quot;, etc.
            &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
              &quot;a_key&quot;: &quot;A String&quot;,
            },
            &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
            &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
          },
          &quot;derived&quot;: { # A message representing a derived metric. # The references to numerator and denominator metrics for a derived metric.
            &quot;denominator&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The name of the denominator metric. e.g. &quot;rows&quot;.
              &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
                &quot;a_key&quot;: &quot;A String&quot;,
              },
              &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
              &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
            },
            &quot;numerator&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The name of the numerator metric. e.g. &quot;latency&quot;.
              &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
                &quot;a_key&quot;: &quot;A String&quot;,
              },
              &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
              &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
            },
          },
          &quot;displayLabel&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The displayed label of the metric.
            &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
              &quot;a_key&quot;: &quot;A String&quot;,
            },
            &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
            &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
          },
          &quot;hasNonzeroData&quot;: True or False, # Whether the metric has any non-zero data.
          &quot;hotValue&quot;: 3.14, # The value that is considered hot for the metric. On a per metric basis hotness signals high utilization and something that might potentially be a cause for concern by the end user. hot_value is used to calibrate and scale visual color scales.
          &quot;indexedHotKeys&quot;: { # The (sparse) mapping from time index to an IndexedHotKey message, representing those time intervals for which there are hot keys.
            &quot;a_key&quot;: { # A message representing a (sparse) collection of hot keys for specific key buckets.
              &quot;sparseHotKeys&quot;: { # A (sparse) mapping from key bucket index to the index of the specific hot row key for that key bucket. The index of the hot row key can be translated to the actual row key via the ScanData.VisualizationData.indexed_keys repeated field.
                &quot;a_key&quot;: 42,
              },
            },
          },
          &quot;indexedKeyRangeInfos&quot;: { # The (sparse) mapping from time interval index to an IndexedKeyRangeInfos message, representing those time intervals for which there are informational messages concerning key ranges.
            &quot;a_key&quot;: { # A message representing a (sparse) collection of KeyRangeInfos for specific key buckets.
              &quot;keyRangeInfos&quot;: { # A (sparse) mapping from key bucket index to the KeyRangeInfos for that key bucket.
                &quot;a_key&quot;: { # A message representing a list of specific information for multiple key ranges.
                  &quot;infos&quot;: [ # The list individual KeyRangeInfos.
                    { # A message representing information for a key range (possibly one key).
                      &quot;contextValues&quot;: [ # The list of context values for this key range.
                        { # A message representing context for a KeyRangeInfo, including a label, value, unit, and severity.
                          &quot;label&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The label for the context value. e.g. &quot;latency&quot;.
                            &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
                              &quot;a_key&quot;: &quot;A String&quot;,
                            },
                            &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
                            &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
                          },
                          &quot;severity&quot;: &quot;A String&quot;, # The severity of this context.
                          &quot;unit&quot;: &quot;A String&quot;, # The unit of the context value.
                          &quot;value&quot;: 3.14, # The value for the context.
                        },
                      ],
                      &quot;endKeyIndex&quot;: 42, # The index of the end key in indexed_keys.
                      &quot;info&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # Information about this key range, for all metrics.
                        &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
                          &quot;a_key&quot;: &quot;A String&quot;,
                        },
                        &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
                        &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
                      },
                      &quot;keysCount&quot;: &quot;A String&quot;, # The number of keys this range covers.
                      &quot;metric&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The name of the metric. e.g. &quot;latency&quot;.
                        &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
                          &quot;a_key&quot;: &quot;A String&quot;,
                        },
                        &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
                        &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
                      },
                      &quot;startKeyIndex&quot;: 42, # The index of the start key in indexed_keys.
                      &quot;timeOffset&quot;: &quot;A String&quot;, # The time offset. This is the time since the start of the time interval.
                      &quot;unit&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The unit of the metric. This is an unstructured field and will be mapped as is to the user.
                        &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
                          &quot;a_key&quot;: &quot;A String&quot;,
                        },
                        &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
                        &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
                      },
                      &quot;value&quot;: 3.14, # The value of the metric.
                    },
                  ],
                  &quot;totalSize&quot;: 42, # The total size of the list of all KeyRangeInfos. This may be larger than the number of repeated messages above. If that is the case, this number may be used to determine how many are not being shown.
                },
              },
            },
          },
          &quot;info&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # Information about the metric.
            &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
              &quot;a_key&quot;: &quot;A String&quot;,
            },
            &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
            &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
          },
          &quot;matrix&quot;: { # A message representing a matrix of floats. # The data for the metric as a matrix.
            &quot;rows&quot;: [ # The rows of the matrix.
              { # A message representing a row of a matrix of floats.
                &quot;cols&quot;: [ # The columns of the row.
                  3.14,
                ],
              },
            ],
          },
          &quot;unit&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The unit of the metric.
            &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
              &quot;a_key&quot;: &quot;A String&quot;,
            },
            &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
            &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
          },
          &quot;visible&quot;: True or False, # Whether the metric is visible to the end user.
        },
      ],
      &quot;prefixNodes&quot;: [ # The list of extracted key prefix nodes used in the key prefix hierarchy.
        { # A message representing a key prefix node in the key prefix hierarchy. for eg. Bigtable keyspaces are lexicographically ordered mappings of keys to values. Keys often have a shared prefix structure where users use the keys to organize data. Eg ///employee In this case Keysight will possibly use one node for a company and reuse it for all employees that fall under the company. Doing so improves legibility in the UI.
          &quot;dataSourceNode&quot;: True or False, # Whether this corresponds to a data_source name.
          &quot;depth&quot;: 42, # The depth in the prefix hierarchy.
          &quot;endIndex&quot;: 42, # The index of the end key bucket of the range that this node spans.
          &quot;startIndex&quot;: 42, # The index of the start key bucket of the range that this node spans.
          &quot;word&quot;: &quot;A String&quot;, # The string represented by the prefix node.
        },
      ],
    },
    &quot;endTime&quot;: &quot;A String&quot;, # The upper bound for when the contained data is defined.
    &quot;startTime&quot;: &quot;A String&quot;, # A range of time (inclusive) for when the contained data is defined. The lower bound for when the contained data is defined.
  },
  &quot;startTime&quot;: &quot;A String&quot;, # A range of time (inclusive) for when the scan is defined. The lower bound for when the scan is defined.
}</pre>
</div>

<div class="method">
    <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
  <pre>Lists Cloud Spanner databases.

Args:
  parent: string, Required. The instance whose databases should be listed. Values are of the form `projects//instances/`. (required)
  pageSize: integer, Number of databases to be returned in the response. If 0 or less, defaults to the server&#x27;s maximum allowed page size.
  pageToken: string, If non-empty, `page_token` should contain a next_page_token from a previous ListDatabasesResponse.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response for ListDatabases.
  &quot;databases&quot;: [ # Databases that matched the request.
    { # A Cloud Spanner database.
      &quot;createTime&quot;: &quot;A String&quot;, # Output only. If exists, the time at which the database creation started.
      &quot;databaseDialect&quot;: &quot;A String&quot;, # Output only. The dialect of the Cloud Spanner Database.
      &quot;defaultLeader&quot;: &quot;A String&quot;, # Output only. The read-write region which contains the database&#x27;s leader replicas. This is the same as the value of default_leader database option set using DatabaseAdmin.CreateDatabase or DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
      &quot;earliestVersionTime&quot;: &quot;A String&quot;, # Output only. Earliest timestamp at which older versions of the data can be read. This value is continuously updated by Cloud Spanner and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.
      &quot;enableDropProtection&quot;: True or False, # Optional. Whether drop protection is enabled for this database. Defaults to false, if not set. For more details, please see how to [prevent accidental database deletion](https://cloud.google.com/spanner/docs/prevent-database-deletion).
      &quot;encryptionConfig&quot;: { # Encryption configuration for a Cloud Spanner database. # Output only. For databases that are using customer managed encryption, this field contains the encryption configuration for the database. For databases that are using Google default or other types of encryption, this field is empty.
        &quot;kmsKeyName&quot;: &quot;A String&quot;, # The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`.
        &quot;kmsKeyNames&quot;: [ # Specifies the KMS configuration for one or more keys used to encrypt the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by `kms_key_names` must fully cover all regions of the database&#x27;s instance configuration. Some examples: * For regional (single-region) instance configurations, specify a regional location KMS key. * For multi-region instance configurations of type `GOOGLE_MANAGED`, either specify a multi-region location KMS key or multiple regional location KMS keys that cover all regions in the instance configuration. * For an instance configuration of type `USER_MANAGED`, specify only regional location KMS keys to cover each region in the instance configuration. Multi-region location KMS keys aren&#x27;t supported for `USER_MANAGED` type instance configurations.
          &quot;A String&quot;,
        ],
      },
      &quot;encryptionInfo&quot;: [ # Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as all Cloud KMS key versions that are in use. The `encryption_status` field inside of each `EncryptionInfo` is not populated. For databases that are using Google default or other types of encryption, this field is empty. This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field.
        { # Encryption information for a Cloud Spanner database or backup.
          &quot;encryptionStatus&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. If present, the status of a recent encrypt/decrypt call on underlying data for this database or backup. Regardless of status, data is always encrypted at rest.
            &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
            &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
              {
                &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
              },
            ],
            &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
          },
          &quot;encryptionType&quot;: &quot;A String&quot;, # Output only. The type of encryption.
          &quot;kmsKeyVersion&quot;: &quot;A String&quot;, # Output only. A Cloud KMS key version that is being used to protect the database or backup.
        },
      ],
      &quot;name&quot;: &quot;A String&quot;, # Required. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database.
      &quot;quorumInfo&quot;: { # Information about the dual-region quorum. # Output only. Applicable only for databases that use dual-region instance configurations. Contains information about the quorum.
        &quot;etag&quot;: &quot;A String&quot;, # Output only. The etag is used for optimistic concurrency control as a way to help prevent simultaneous `ChangeQuorum` requests that might create a race condition.
        &quot;initiator&quot;: &quot;A String&quot;, # Output only. Whether this `ChangeQuorum` is Google or User initiated.
        &quot;quorumType&quot;: { # Information about the database quorum type. This only applies to dual-region instance configs. # Output only. The type of this quorum. See QuorumType for more information about quorum type specifications.
          &quot;dualRegion&quot;: { # Message type for a dual-region quorum. Currently this type has no options. # Dual-region quorum type.
          },
          &quot;singleRegion&quot;: { # Message type for a single-region quorum. # Single-region quorum type.
            &quot;servingLocation&quot;: &quot;A String&quot;, # Required. The location of the serving region, for example, &quot;us-central1&quot;. The location must be one of the regions within the dual-region instance configuration of your database. The list of valid locations is available using the GetInstanceConfig API. This should only be used if you plan to change quorum to the single-region quorum type.
          },
        },
        &quot;startTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the request was triggered.
      },
      &quot;reconciling&quot;: True or False, # Output only. If true, the database is being updated. If false, there are no ongoing update operations for the database.
      &quot;restoreInfo&quot;: { # Information about the database restore. # Output only. Applicable only for restored databases. Contains information about the restore source.
        &quot;backupInfo&quot;: { # Information about a backup. # Information about the backup used to restore the database. The backup may no longer exist.
          &quot;backup&quot;: &quot;A String&quot;, # Name of the backup.
          &quot;createTime&quot;: &quot;A String&quot;, # The time the CreateBackup request was received.
          &quot;sourceDatabase&quot;: &quot;A String&quot;, # Name of the database the backup was created from.
          &quot;versionTime&quot;: &quot;A String&quot;, # The backup contains an externally consistent copy of `source_database` at the timestamp specified by `version_time`. If the CreateBackup request did not specify `version_time`, the `version_time` of the backup is equivalent to the `create_time`.
        },
        &quot;sourceType&quot;: &quot;A String&quot;, # The type of the restore source.
      },
      &quot;state&quot;: &quot;A String&quot;, # Output only. The current database state.
      &quot;versionRetentionPeriod&quot;: &quot;A String&quot;, # Output only. The period in which Cloud Spanner retains all versions of data for the database. This is the same as the value of version_retention_period database option set using UpdateDatabaseDdl. Defaults to 1 hour, if not set.
    },
  ],
  &quot;nextPageToken&quot;: &quot;A String&quot;, # `next_page_token` can be sent in a subsequent ListDatabases call to fetch more of the matching databases.
}</pre>
</div>

<div class="method">
    <code class="details" id="list_next">list_next()</code>
  <pre>Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call &#x27;execute()&#x27; on to request the next
          page. Returns None if there are no more items in the collection.
        </pre>
</div>

<div class="method">
    <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
  <pre>Updates a Cloud Spanner database. The returned long-running operation can be used to track the progress of updating the database. If the named database does not exist, returns `NOT_FOUND`. While the operation is pending: * The database&#x27;s reconciling field is set to true. * Cancelling the operation is best-effort. If the cancellation succeeds, the operation metadata&#x27;s cancel_time is set, the updates are reverted, and the operation terminates with a `CANCELLED` status. * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error until the pending operation is done (returns successfully or with error). * Reading the database via the API continues to give the pre-request values. Upon completion of the returned operation: * The new values are in effect and readable via the API. * The database&#x27;s reconciling field becomes false. The returned long-running operation will have a name of the format `projects//instances//databases//operations/` and can be used to track the database modification. The metadata field type is UpdateDatabaseMetadata. The response field type is Database, if successful.

Args:
  name: string, Required. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database. (required)
  body: object, The request body.
    The object takes the form of:

{ # A Cloud Spanner database.
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. If exists, the time at which the database creation started.
  &quot;databaseDialect&quot;: &quot;A String&quot;, # Output only. The dialect of the Cloud Spanner Database.
  &quot;defaultLeader&quot;: &quot;A String&quot;, # Output only. The read-write region which contains the database&#x27;s leader replicas. This is the same as the value of default_leader database option set using DatabaseAdmin.CreateDatabase or DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
  &quot;earliestVersionTime&quot;: &quot;A String&quot;, # Output only. Earliest timestamp at which older versions of the data can be read. This value is continuously updated by Cloud Spanner and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.
  &quot;enableDropProtection&quot;: True or False, # Optional. Whether drop protection is enabled for this database. Defaults to false, if not set. For more details, please see how to [prevent accidental database deletion](https://cloud.google.com/spanner/docs/prevent-database-deletion).
  &quot;encryptionConfig&quot;: { # Encryption configuration for a Cloud Spanner database. # Output only. For databases that are using customer managed encryption, this field contains the encryption configuration for the database. For databases that are using Google default or other types of encryption, this field is empty.
    &quot;kmsKeyName&quot;: &quot;A String&quot;, # The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`.
    &quot;kmsKeyNames&quot;: [ # Specifies the KMS configuration for one or more keys used to encrypt the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by `kms_key_names` must fully cover all regions of the database&#x27;s instance configuration. Some examples: * For regional (single-region) instance configurations, specify a regional location KMS key. * For multi-region instance configurations of type `GOOGLE_MANAGED`, either specify a multi-region location KMS key or multiple regional location KMS keys that cover all regions in the instance configuration. * For an instance configuration of type `USER_MANAGED`, specify only regional location KMS keys to cover each region in the instance configuration. Multi-region location KMS keys aren&#x27;t supported for `USER_MANAGED` type instance configurations.
      &quot;A String&quot;,
    ],
  },
  &quot;encryptionInfo&quot;: [ # Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as all Cloud KMS key versions that are in use. The `encryption_status` field inside of each `EncryptionInfo` is not populated. For databases that are using Google default or other types of encryption, this field is empty. This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field.
    { # Encryption information for a Cloud Spanner database or backup.
      &quot;encryptionStatus&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. If present, the status of a recent encrypt/decrypt call on underlying data for this database or backup. Regardless of status, data is always encrypted at rest.
        &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
        &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
          {
            &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
          },
        ],
        &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
      },
      &quot;encryptionType&quot;: &quot;A String&quot;, # Output only. The type of encryption.
      &quot;kmsKeyVersion&quot;: &quot;A String&quot;, # Output only. A Cloud KMS key version that is being used to protect the database or backup.
    },
  ],
  &quot;name&quot;: &quot;A String&quot;, # Required. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database.
  &quot;quorumInfo&quot;: { # Information about the dual-region quorum. # Output only. Applicable only for databases that use dual-region instance configurations. Contains information about the quorum.
    &quot;etag&quot;: &quot;A String&quot;, # Output only. The etag is used for optimistic concurrency control as a way to help prevent simultaneous `ChangeQuorum` requests that might create a race condition.
    &quot;initiator&quot;: &quot;A String&quot;, # Output only. Whether this `ChangeQuorum` is Google or User initiated.
    &quot;quorumType&quot;: { # Information about the database quorum type. This only applies to dual-region instance configs. # Output only. The type of this quorum. See QuorumType for more information about quorum type specifications.
      &quot;dualRegion&quot;: { # Message type for a dual-region quorum. Currently this type has no options. # Dual-region quorum type.
      },
      &quot;singleRegion&quot;: { # Message type for a single-region quorum. # Single-region quorum type.
        &quot;servingLocation&quot;: &quot;A String&quot;, # Required. The location of the serving region, for example, &quot;us-central1&quot;. The location must be one of the regions within the dual-region instance configuration of your database. The list of valid locations is available using the GetInstanceConfig API. This should only be used if you plan to change quorum to the single-region quorum type.
      },
    },
    &quot;startTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the request was triggered.
  },
  &quot;reconciling&quot;: True or False, # Output only. If true, the database is being updated. If false, there are no ongoing update operations for the database.
  &quot;restoreInfo&quot;: { # Information about the database restore. # Output only. Applicable only for restored databases. Contains information about the restore source.
    &quot;backupInfo&quot;: { # Information about a backup. # Information about the backup used to restore the database. The backup may no longer exist.
      &quot;backup&quot;: &quot;A String&quot;, # Name of the backup.
      &quot;createTime&quot;: &quot;A String&quot;, # The time the CreateBackup request was received.
      &quot;sourceDatabase&quot;: &quot;A String&quot;, # Name of the database the backup was created from.
      &quot;versionTime&quot;: &quot;A String&quot;, # The backup contains an externally consistent copy of `source_database` at the timestamp specified by `version_time`. If the CreateBackup request did not specify `version_time`, the `version_time` of the backup is equivalent to the `create_time`.
    },
    &quot;sourceType&quot;: &quot;A String&quot;, # The type of the restore source.
  },
  &quot;state&quot;: &quot;A String&quot;, # Output only. The current database state.
  &quot;versionRetentionPeriod&quot;: &quot;A String&quot;, # Output only. The period in which Cloud Spanner retains all versions of data for the database. This is the same as the value of version_retention_period database option set using UpdateDatabaseDdl. Defaults to 1 hour, if not set.
}

  updateMask: string, Required. The list of fields to update. Currently, only `enable_drop_protection` field can be updated.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
      },
    ],
    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
  &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="restore">restore(parent, body=None, x__xgafv=None)</code>
  <pre>Create a new database by restoring from a completed backup. The new database must be in the same project and in an instance with the same instance configuration as the instance containing the backup. The returned database long-running operation has a name of the format `projects//instances//databases//operations/`, and can be used to track the progress of the operation, and to cancel it. The metadata field type is RestoreDatabaseMetadata. The response type is Database, if successful. Cancelling the returned operation will stop the restore and delete the database. There can be only one database being restored into an instance at a time. Once the restore operation completes, a new restore operation can be initiated, without waiting for the optimize operation associated with the first restore to complete.

Args:
  parent: string, Required. The name of the instance in which to create the restored database. This instance must be in the same project and have the same instance configuration as the instance containing the source backup. Values are of the form `projects//instances/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request for RestoreDatabase.
  &quot;backup&quot;: &quot;A String&quot;, # Name of the backup from which to restore. Values are of the form `projects//instances//backups/`.
  &quot;databaseId&quot;: &quot;A String&quot;, # Required. The id of the database to create and restore to. This database must not already exist. The `database_id` appended to `parent` forms the full database name of the form `projects//instances//databases/`.
  &quot;encryptionConfig&quot;: { # Encryption configuration for the restored database. # Optional. An encryption configuration describing the encryption type and key resources in Cloud KMS used to encrypt/decrypt the database to restore to. If this field is not specified, the restored database will use the same encryption configuration as the backup by default, namely encryption_type = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
    &quot;encryptionType&quot;: &quot;A String&quot;, # Required. The encryption type of the restored database.
    &quot;kmsKeyName&quot;: &quot;A String&quot;, # Optional. This field is maintained for backwards compatibility. For new callers, we recommend using `kms_key_names` to specify the KMS key. Only use `kms_key_name` if the location of the KMS key matches the database instance&#x27;s configuration (location) exactly. For example, if the KMS location is in `us-central1` or `nam3`, then the database instance must also be in `us-central1` or `nam3`. The Cloud KMS key that is used to encrypt and decrypt the restored database. Set this field only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//keyRings//cryptoKeys/`.
    &quot;kmsKeyNames&quot;: [ # Optional. Specifies the KMS configuration for one or more keys used to encrypt the database. Values have the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by `kms_key_names` must fully cover all regions of the database&#x27;s instance configuration. Some examples: * For regional (single-region) instance configurations, specify a regional location KMS key. * For multi-region instance configurations of type `GOOGLE_MANAGED`, either specify a multi-region location KMS key or multiple regional location KMS keys that cover all regions in the instance configuration. * For an instance configuration of type `USER_MANAGED`, specify only regional location KMS keys to cover each region in the instance configuration. Multi-region location KMS keys aren&#x27;t supported for `USER_MANAGED` type instance configurations.
      &quot;A String&quot;,
    ],
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
      },
    ],
    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
  &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
  <pre>Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource. For backup schedules, authorization requires `spanner.backupSchedules.setIamPolicy` permission on resource.

Args:
  resource: string, REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for databases resources. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for `SetIamPolicy` method.
  &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them.
    &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
      { # Associates `members`, or principals, with a `role`.
        &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
          &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
          &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
          &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
        },
        &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
          &quot;A String&quot;,
        ],
        &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
      },
    ],
    &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
    &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
  &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
    { # Associates `members`, or principals, with a `role`.
      &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
        &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
        &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
        &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
        &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
      },
      &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
        &quot;A String&quot;,
      ],
      &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
    },
  ],
  &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
  &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
}</pre>
</div>

<div class="method">
    <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
  <pre>Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance. Calling this method on a backup schedule that does not exist will result in a NOT_FOUND error if the user has `spanner.backupSchedules.list` permission on the containing database.

Args:
  resource: string, REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for `TestIamPermissions` method.
  &quot;permissions&quot;: [ # REQUIRED: The set of permissions to check for &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27;, &#x27;spanner.*&#x27;, &#x27;spanner.instances.*&#x27;) are not allowed.
    &quot;A String&quot;,
  ],
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for `TestIamPermissions` method.
  &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
    &quot;A String&quot;,
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="updateDdl">updateDdl(database, body=None, x__xgafv=None)</code>
  <pre>Updates the schema of a Cloud Spanner database by creating/altering/dropping tables, columns, indexes, etc. The returned long-running operation will have a name of the format `/operations/` and can be used to track execution of the schema changes. The metadata field type is UpdateDatabaseDdlMetadata. The operation has no response.

Args:
  database: string, Required. The database to update. (required)
  body: object, The request body.
    The object takes the form of:

{ # Enqueues the given DDL statements to be applied, in order but not necessarily all at once, to the database schema at some point (or points) in the future. The server checks that the statements are executable (syntactically valid, name tables that exist, etc.) before enqueueing them, but they may still fail upon later execution (for example, if a statement from another batch of statements is applied first and it conflicts in some way, or if there is some data-related problem like a `NULL` value in a column to which `NOT NULL` would be added). If a statement fails, all subsequent statements in the batch are automatically cancelled. Each batch of statements is assigned a name which can be used with the Operations API to monitor progress. See the operation_id field for more details.
  &quot;operationId&quot;: &quot;A String&quot;, # If empty, the new update request is assigned an automatically-generated operation ID. Otherwise, `operation_id` is used to construct the name of the resulting Operation. Specifying an explicit operation ID simplifies determining whether the statements were executed in the event that the UpdateDatabaseDdl call is replayed, or the return value is otherwise lost: the database and `operation_id` fields can be combined to form the `name` of the resulting longrunning.Operation: `/operations/`. `operation_id` should be unique within the database, and must be a valid identifier: `a-z*`. Note that automatically-generated operation IDs always begin with an underscore. If the named operation already exists, UpdateDatabaseDdl returns `ALREADY_EXISTS`.
  &quot;protoDescriptors&quot;: &quot;A String&quot;, # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). To generate it, [install](https://grpc.io/docs/protoc-installation/) and run `protoc` with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run ``` $protoc --proto_path=/app_path --proto_path=/lib_path \ --include_imports \ --descriptor_set_out=descriptors.data \ moon/shot/app.proto ``` For more details, see protobuffer [self description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
  &quot;statements&quot;: [ # Required. DDL statements to be applied to the database.
    &quot;A String&quot;,
  ],
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
      },
    ],
    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
  &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
}</pre>
</div>

</body></html>